
<div class="page-content">
<div class="panel panel-default">
				<div class="panel-heading">
								<ul class="breadcrumb">
											 	<li class="active">考试成绩查询	</li>
								</ul>
				</div>
				<div class="panel-body">
				<!-- Nav tabs -->
  <ul class="nav nav-tabs" role="tablist">
    <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">计算机</a></li>
    <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">会计</a></li>
      </ul>

  <!-- Tab panes -->
  <div class="tab-content">
    <div role="tabpanel" class="tab-pane active" id="home">
				<form   class="form-horizontal" id="computer-examSetting" data-type="ajaxSubmit" action="<{:U('examSetting')}>" autocomplete="off" method="post" novalidate>
												<div class="form-group">
												<input type="hidden" name="state" value="">
													<input type="hidden" name="opt" value="queryC">
														<input type="hidden" name="ksxm" value="300">
																<label class="col-sm-2 control-label">请选择考试时间</label>
																<div class="col-sm-7">
																			<select name="ksnf" onChange="select_sf()">
																			<volist name="array_computer['ksnf']" id="vo">
																								<option value="<{$vo.value}>"><{$vo.text}></option>
																				</volist>				
																				</select>
																</div>
																<div class="col-sm-3"> </div>
												</div>
												
												<div class="form-group">
																<label class="col-sm-2 control-label">请选择报考省份</label>
																<div class="col-sm-7">
																			<select name="sf">
																			 	
																				</select>
																</div>
																<div class="col-sm-3"> </div>
												</div>
												
												<div class="form-group">
																<label class="col-sm-2 control-label">请选择报考级别</label>
																<div class="col-sm-7">
																				<select name="bkjb">
																			<volist name="array_computer['bkjb']" id="vo">
																								<option value="<{$vo.value}>"><{$vo.text}></option>
																				</volist>				
																				</select>
																</div>
																<div class="col-sm-3"> </div>
												</div>
												
			
												<div class="form-group">
																<label class="col-sm-2 control-label">请输入姓名</label>
																<div class="col-sm-7">
																		 <input type="text" class="form-control" name="name" value="关枫">
																</div>
																<div class="col-sm-3"> </div>
												</div>
												
												
												<div class="form-group">
																<label class="col-sm-2 control-label">报名信息</label>
																<div class="col-sm-7">
																 
              <label class="radio inline">
                <input type="radio" name="radioBMFS" onClick="DoRadioBMFS()"  value="sfzh" checked="checked">
                身份证号&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              </label>
              <label class="radio inline">
                <input type="radio" name="radioBMFS"   onClick="DoRadioBMFS()"  value="zkzh">
                准考证号
              </label>
       
																</div>
																<div class="col-sm-3"> </div>
												</div>
												
												
														<div class="form-group hide_div" id="zkzh_div">
																<label class="col-sm-2 control-label"></label>
																<div class="col-sm-7">
																		 <input type="text" class="form-control"  name="zkzh" value="">
																</div>
																<div class="col-sm-3"> </div>
												</div>
												
													<div class="form-group hide_div" id="sfzh_div">
																<label class="col-sm-2 control-label"></label>
																<div class="col-sm-7">
																		 <input type="text" class="form-control" name="sfzh" data-bv-id-country="CN"  data-bv-id   value="131082198510070764">
																</div>
																<div class="col-sm-3"> </div>
												</div>
												
														<div class="form-group">
																<label class="col-sm-2 control-label">输入验证码</label>
																<div class="col-sm-2">
																		 <input type="text" class="form-control" name="rand" value="">
																</div>
																<div class="col-sm-3"><img src="data:image/png;base64,<{$computerCodeImage}>"/> </div>
												</div>
												
											 
												<div class="form-group">
																<div class="col-sm-offset-2 col-sm-7">
																<input type="hidden" value="computer" name="type">
																				<button type="submit"   class="btn btn-primary">查询</button>
																				<a  href="<{:U('examSetting',array('type'=>'reload'))}>" class="btn btn-primary">更新缓存</a>
																</div>
												</div>
								</form>
				</div>
				
    <div role="tabpanel" class="tab-pane" id="profile">
				<form   class="form-horizontal" id="accountancy-examSetting" data-type="ajaxSubmit"   action="<{:U('examSetting')}>" autocomplete="off" method="post" novalidate>
												 
												
												 
												
												 
												
												<div class="form-group">
																<label class="col-sm-2 control-label">考生姓名</label>
																<div class="col-sm-7">
																		 <input type="text" class="form-control" name="name" value="杨帆">
																</div>
																<div class="col-sm-3"> </div>
												</div>
												
													<div class="form-group">
																<label class="col-sm-2 control-label">证件号码</label>
																<div class="col-sm-7">
																		 <input type="text" class="form-control" data-bv-id-country="CN"  data-bv-id   name="cid" value="370203199604306321">
																</div>
																<div class="col-sm-3"> </div>
												</div>
												
												
												<div class="form-group">
																<label class="col-sm-2 control-label">报名预留手机号</label>
																<div class="col-sm-7">
																		 <input type="text" class="form-control" data-bv-phone-country="CN"  data-bv-phone name="phone" value="18678931638">
																</div>
																<div class="col-sm-3"> </div>
												</div>
												
												<div class="form-group">
																<label class="col-sm-2 control-label">手机验证码</label>
																<div class="col-sm-2">
																		 <input type="text" class="form-control" name="dyzm" value="">
																</div>
																<div class="col-sm-2"><button type="submit" onclick="$('#accountancy_type').val(1)" id="sendmsg"   class="btn btn-primary btn-sm">发送手机验证码</button></div>
												</div>
												
												 
		 
			
												
												<div class="form-group">
																<div class="col-sm-offset-2 col-sm-7">
																<input type="hidden" value="accountancy"  name="type">
																		<input type="hidden" value="1"  id="accountancy_type" name="accountancy_type">
																				<button type="submit"    onclick="$('#accountancy_type').val(2)"  class="btn btn-primary">查询</button>
																				 
																</div>
												</div>
								</form>
				</div>
 
  </div>
 
<script>
$(function(){
    $("#computer-examSetting").bootstrapValidator({
        message: '您填入的值不合法',
        fields:{
            zkzh: {
                message: '准考证号',
                validators: {
                    notEmpty: {
                        message: '请输入准考证号'
                    },
                }
            },
												
												sfzh: {
                message: '证件号码',
                validators: {
                    notEmpty: {
                        message: '请输入证件号码'
                    },
                }
            },
												
			        name: {
                message: '姓名',
                validators: {
                    notEmpty: {
                        message: '请输入姓名'
                    },
					       
                }
            },
												
 

        }
    });
				
				
				$("#accountancy-examSetting").bootstrapValidator({
        message: '您填入的值不合法',
        fields:{
            phone: {
                message: '手机号',
                validators: {
                    notEmpty: {
                        message: '请输入手机号'
                    },
                }
            },
												
												cid: {
                message: '证件号码',
                validators: {
                    notEmpty: {
                        message: '请输入证件号码'
                    },
                }
            },
												
			        name: {
                message: '姓名',
                validators: {
                    notEmpty: {
                        message: '请输入姓名'
                    },
					       
                }
            },
												
 

        }
    });
	
 
});

function DoRadioBMFS(){
					 $(".hide_div").hide();
								var id=$("[name='radioBMFS']:checked").val();
								$("#"+id+"_div").show();
								if(id=="zkzh"){
								  $("[name='sfzh']").val("");
								}else{
									$("[name='zkzh']").val("");
								}
								
				}
DoRadioBMFS()
</script>
	
<script>
var sf=<{$sf}>;
select_sf();
function select_sf(){
				var value=$("[name='ksnf']").val();
				var html="";
				$.each(sf[value],function(i,vo){
				  html+='<option value="'+vo.value+'">'+vo.text+'</option>';	
				})
				$("[name='sf']").html(html);
}


$(function(){
	   $("#computer-examSetting").on("ajaxSubmitSuccess",function(event,data){
					   data=JSON.parse(data);
								if(typeof(data.msg)=="string"){
								  dialog(data.msg);
								}else{
									 var html='<table class="table  table-striped"><tbody>';
									
										$.each(data.msg,function(i,v){
											 html+='<tr><th scope="row"><code style="color:#000">'+i+'</code></th><td>'+v+'</td></tr>';
										})
										 html+='<tr><td  colspan="2"><a class="btn btn-primary btn-lg btn-block" onclick="close_exam_query_results()">确定</a></td></tr>';
										html+='</tbody></table>';
										hiApp.modal(html,"exam_query_results","成绩查询结果");
								}
	   })
				
				
				 $("#accountancy-examSetting").on("ajaxSubmitSuccess",function(event,data){
					   data=JSON.parse(data);
								console.log(data);
							//	alert(data.msg);
							if(data.error>0){
							  dialog(data.msg);	
							}
							var accountancy_type=$("#accountancy_type").val();
							if(data.error==0 && accountancy_type==1){
									 dialog(data.msg);	
										time_wait("#sendmsg");
							}
							hiApp.modal(data.msg,"exam_query_results","成绩查询结果");
							//	console.log(data);return false;
//								if(typeof(data.msg)=="string"){
//								  dialog(data.msg);
//								}else{
//									 var html='<table class="table  table-striped"><tbody>';
//									
//										$.each(data.msg,function(i,v){
//											 html+='<tr><th scope="row"><code style="color:#000">'+i+'</code></th><td>'+v+'</td></tr>';
//										})
//										 html+='<tr><td  colspan="2"><a class="btn btn-primary btn-lg btn-block" onclick="close_exam_query_results()">确定</a></td></tr>';
//										html+='</tbody></table>';
//										hiApp.modal(html,"exam_query_results","成绩查询结果");
//								}
	   })
				
				
				
})
function close_exam_query_results(){
					 $("#exam_query_results").modal("hide");
				}
				
		/*****验证码等待1分钟**/
function time_wait(obj,savebg){
	window.wait=120;
	time(obj);
	function time(obj) {
		if (wait == 0) {        
		 	$(obj).html('重新发送短信验证码');
		 	wait = 120; 
			 $(obj).removeAttr("disabled");	
		} else { 
			$(obj).attr("disabled","disabled");
			$(obj).html("重新发送(" + wait + ")");
			$(obj).val("重新发送(" + wait + ")");
			wait--;
			setTimeout(function() {
				time(obj)
			},
			1000);
			 
		}
	}   
}		
</script>
					
				</div>
</div>
